# https://leetcode.cn/problems/majority-element/description/?envType=problem-list-v2&envId=array
from typing import List


class Solution:
    def majorityElement(self, nums: List[int]) -> int:
        big = len(nums) / 2
        for i in set(nums):
            if nums.count(i) > big:
                return i


if __name__ == '__main__':
    nums = [3, 2, 3]
    solution = Solution()
    print(solution.majorityElement(nums))
